import request from '@/utils/request'

// 查询产品SN详情列表
export function listProductSnInfo(query) {
  return request({
    url: '/produce/product-sn-info/list',
    method: 'get',
    params: query
  })
}

// 查询产品SN详情详细
export function getProductSnInfo(id) {
  return request({
    url: '/produce/product-sn-info/' + id,
    method: 'get'
  })
}

// 新增产品SN详情
export function addProductSnInfo(data) {
  return request({
    url: '/produce/product-sn-info',
    method: 'post',
    data: data
  })
}

// 修改产品SN详情
export function updateProductSnInfo(data) {
  return request({
    url: '/produce/product-sn-info',
    method: 'put',
    data: data
  })
}

// 删除产品SN详情
export function delProductSnInfo(id) {
  return request({
    url: '/produce/product-sn-info/' + id,
    method: 'delete'
  })
}

// 逻辑删除产品SN详情
export function removedProductSnInfo(id) {
  return request({
    url: '/produce/product-sn-info/' + id,
    method: 'delete'
  })
}

// 根据SN获取产品详情
export function getProductInfoBySn(query) {
  return request({
    url: '/produce/product-sn-info/get-product-info/',
    method: 'get',
    params: query
    
  })
}

// 根据imei批量注销测试项
export function batchLogOffByImei(data) {
  return request({
    url: '/produce/product-sn-info/batch-log-off-by-imei',
    method: 'put',
    data: data
  })
}

// 根据sn批量注销测试项
export function batchLogOffBySn(data) {
  return request({
    url: '/produce/product-sn-info/batch-log-off-by-sn-code',
    method: 'put',
    data: data
  })
}
